package com.cinyi.cyds.test;

public abstract class InterceptRunnable implements Runnable
{
    private AbstractThreadBaseCase testCase ;
    public InterceptRunnable(AbstractThreadBaseCase testCase){
        this.testCase = testCase;
    }
    
    @Override
    public void run()
    {
        testCase.increaseCount();
        try{
            handle();
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }finally{
            testCase.decreaseCount();
        }
       
    }

    public abstract void handle() throws Exception;
    
}
